<?php 

$controller = isset($_GET['c'])?$_GET['c']:'match';
$action = isset($_GET['a'])?$_GET['a']:'matchlist';
$mudel= isset($_GET['h'])?$_GET['h']:'home';

define("CONTROLLER", $controller);
define("ACTION", $action);
define("MUDEL", $mudel);

$controllername = CONTROLLER.'controller';
$actionname=ACTION.'action';

spl_autoload_register('myload');
$classlist=array(
'factory'=>'./framework/factory.class.php',
'model'=>'./framework/model.class.php',
'MySqlDB'=>'./framework/mysql.class.php',
'Smarty'=>'./framework/lib/smarty/libs/Smarty.class.php',
'controller'=>'./framework/controller.class.php',
	);

function myload($class){
	GLOBAL $classlist;
if (isset($classlist[$class])) {
	// var_dump($classlist[$class]);
	include_once($classlist[$class]);
}elseif (substr($class, -10)=='controller') {
	include_once('./app/'.MUDEL.'/controller/'.$class.'.class.php');
}elseif (substr($class, -5)=='model') {
	include_once('./app/'.MUDEL.'/model/'.$class.'.class.php');
}
}

$match=new $controllername();
$match->$actionname();





 ?>